package net.fdukedom.epicurus.tools.logging;

/**
 * Log entries status.
 *
 * @author Dmitry Y. Kochelaev
 */
public enum Status {

    /**
     * Debug level.
     */
    DEBUG("DEBUG", 0),

    /**
     * Info level.
     */
    INFO("INFO", 1),

    /**
     * Warning level.
     */
    WARN("WARN", 2),

    /**
     * Error level.
     */
    ERROR("ERROR", 3),

    /**
     * Fatal error level.
     */
    FATAL("FATAL", 4);

    /**
     * String representation of status.
     */
    private final String value;

    /**
     * Integer representation of status.
     */
    private final int status;

    /**
     * Creates instance out of its string representation an int value.
     *
     * @param value string value
     * @param status status
     */
    private Status(String value, int status) {
        this.value = value;
        this.status = status;
    }

    /**
     * Returns value.
     *
     * @return value
     */
    public String getValue() {
        return value;
    }

    /**
     * Returns integer status.
     *
     * @return integer status
     */
    public int getStatus() {
        return status;
    }
}
